package cn.lili.controller.feign.system;

import cn.lili.common.vo.ResultMessage;
import cn.lili.modules.goods.entity.dos.Goods;
import cn.lili.modules.goods_auth.service.AuthSpaceGoodsService;
import cn.lili.modules.goods_auth.service.GoodsAuthOpenApiService;
import cn.lili.modules.system.client.GoodsAuthClient;
import cn.lili.modules.system.entity.dos.GoodsAuthOpenCallback;
import cn.lili.modules.system.entity.dos.LiAuthSpaceGoods;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author xiangqian
 * @version 1.0
 * @data 2023/11/27 15:56
 */
@RestController
@RequiredArgsConstructor
public class GoodsAuthFeignController implements GoodsAuthClient {

    @Resource
    private GoodsAuthOpenApiService goodsAuthOpenApiService;

    @Resource
    private AuthSpaceGoodsService authSpaceGoodsService;

    @Override
    public ResultMessage<Object> callBackGoods(GoodsAuthOpenCallback callback) {
        return goodsAuthOpenApiService.callBackGoods(callback);
    }

    @Override
    public List<Goods> getListByAuthSpace (String name) {
        return authSpaceGoodsService.getListByAuthSpace(name);
    }
}
